﻿/*
 * OverviewManager
 * 
 * Copyright (c) Adam Sida, asida@centrum.cz
 * 
 * All rights reserved.
 */
using System;
using System.Collections.Generic;
using Petra.Gis.Imaging.Tiff;



namespace Petra.Gis.Geometry.Image
{
  public class Overview
  {

    List<ImageBlock> _blocks = new List<ImageBlock>();

    object _frame; //tiff frame or specific image



    internal Overview(object frame)
    {
      _frame = frame;

      if (_frame.GetType() == typeof(TiffBitmapPage))
      { 
        foreach(BitmapBlock b in ((TiffBitmapPage)_frame).Blocks)
          _blocks.Add(new ImageBlock(b));
      }

    }




    public List<ImageBlock> Blocks
    {
      get { return _blocks; }

    }




    public int pixelWidth
    {
      get 
      {
        return ((TiffBitmapPage)_frame).PixelWidth;
      }
    }




    public int pixelHeight
    {
      get 
      {
        return ((TiffBitmapPage)_frame).PixelHeight;
      }
    }




  }
}
